home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
BREEZ1A.422
< prev
next >
Wrap
Text File
|
1993-02-22
|
8KB
|
252 lines
2{3BREEZ1A.MOD2} 0Keep Titles
Mr. Breeze #6 @13651
Thu Feb 18 15:05:52 1993
┌───────────────────────────╢ PLEASE USE THIS! ╟─────────────────────────────┐
│ Mod Name : BREEZE1A.MOD Mod Author : Mr. Breeze │
│ Difficulty : ▓░░░░ Easy WWIVLink : 6 @ 13651 │
│ Date : February 18th, 1993 WWIVNet : 6 @ 3651 │
│ ICEnet : 6 @ 3651 │
│ WWIV version: 4.22, Probably previous too. │
│ │
│ Description: Keeps the title of the message or mail being replied to. │
│ Supports color in titles (as far as backspacing). │
└────────────────────────────────────────────────────────────────────────────┘
This mod was designed so that titles of like messages can be immediately
recognized. For example, if someone is using a QWK reader, he may have his
titles alphabetized. With this mod, all titles that pertain to the same
subject will have the same title!
This mod will display and use the title of the message being responded to.
This is like many QWK readers, and 'other' BBS software. As written, it
will prompt for a title like usual, though it will display the title of the
message the user is responding to (with color if previous title had color).
If the user hits 'Enter', the title display will be used for the post (or
E-mail). If a 'space' is entered by the user, then he will be able to
"append" to the current title. Any other key will backspace over the
title that is displayed, and allow the user to enter his own title.
This has built-in support for the Color Titles mod, so if you're not using it,
you will want to delete the lines that are commented as /* Color Titles */.
Find this block of code in MSGBASE.C 'void inmsg(blah..blah..)'
nl();
helpl=6;
if (okansi()) {
prt(2,get_string(326));
mpl(60);
inputl(title,60);
} else {
pl(get_string(626));
outstr(get_string(326));
inputl(title,60);
}
And replace it with THIS block of code.
(If your not using the color titles mod, delete the 3 lines indicated */
if (needtitle) { /* Begin BREEZE1A.MOD */
nl();
helpl=6;
sprintf(ro,""); /* Color Titles */
if (irt[0]) {
prt(5,get_string(972)); /* Note */
nl();
} else {
prt(5,get_string(973)); /* Note */
nl();
}
if (okansi()) {
prt(2,get_string(326)); /*Title: */
mpl(60);
gtitle=1; /* Color Titles */
if (irt[0]) {
prt(4,irt);
titlein(title,60);
} else
inputl(title,60);
} else {
pl(get_string(626));
outstr(get_string(326)); /*Title: */
gtitle=1; /* Color Titles */
if (irt[0]) {
prt(4,irt);
titlein(title,60);
} else
inputl(title,60);
}
} /* End BREEZE1A.MOD */
Then load up COM.C (or NEW.C, or STRINGS.C, wherever you put new voids).
Add these voids after 'void input1(...)' if in COM.C.
(Yes, it's just a re-write of 'void input1(...)'. Perhaps I'll optimize it
in the future).
Note: If your using Tolkien's ENHANCE.C, you already have 'int strlena(...)'.
int strlena(char *s)
/* From Tolkien's ENHANCE.C
* 'strlena' function returns the length of a string WITHOUT color codes
*/
{
int i=0,a=0;
checkhangup();
if (!hungup)
while (s[i])
if (s[i++]==3)
i++;
else
a++;
return(a);
}
void titlein(char *s, int maxlen)
/* BREEZE1A.MOD
* This will input a title, using 's1' as the default.
*/
{
char s1[81];
int curpos=0, done=0, in_ansi=0, i, rndm;
unsigned char ch;
ansic(4);
i=strlena(irt); /* From Tolkien's ENHANCE.C */
while (!done && !hangup) {
ch = getkey();
if (curpos==0) {
if (ch==13) {
strcpy(s,irt);
nl();
break;
} else if (ch==26) {
s[0]=0;
nl();
break;
} else if (ch==32) {
curpos=i;
strcpy(s,irt);
strcat(s," ");
} else
while (i) {
i--;
backspace();
}
}
if (in_ansi) {
if ((in_ansi==1) && (ch!='['))
in_ansi=0;
else {
if (in_ansi==1)
in_ansi=2;
else if (((ch<'0') || (ch>'9')) && (ch!=';'))
in_ansi=3;
else
in_ansi=2;
}
}
if (!in_ansi) {
if (ch > 31) {
if (curpos < maxlen) {
s[curpos++] = ch;
outchr(ch);
}
} else
switch(ch) {
case 13:
s[curpos] = 0;
done = echo = 1;
nl();
break;
case 14: /* Ctrl-N */ /* Color Titles */
if(gtitle) { /* Color Titles */
if ((wherex()) && (curpos<maxlen)) { /* Color Titles */
outchr(8); /* Color Titles */
s[curpos++]=8; /* Color Titles */
} /* Color Titles */
} /* Color Titles */
break; /* Color Titles */
case 16: /* Ctrl-P */ /* Color Titles */
if(gtitle) { /* Color Titles */
if (curpos<maxlen-1) { /* Color Titles */
ch=getkey(); /* Color Titles */
if ((ch>='0') && (ch<='9')) { /* Color Titles */
s[curpos++]=3; /* Color Titles */
s[curpos++]=ch; /* Color Titles */
ansic(ch-'0'); /* Color Titles */
} /* Color Titles */
} /* Color Titles */
} /* Color Titles */
break; /* Color Titles */
case 23: /* Ctrl-W */
if (curpos) {
do {
curpos--;
backspace();
if (s[curpos]==26)
backspace();
} while ((curpos) && (s[curpos-1]!=32));
}
break;
case 26:
if (input_extern) {
s[curpos++] = 26;
outstr(get_string(307)); /*^Z*/
} else {
s[0]=0;
nl();
done=echo=1;
}
break;
case 8:
if (curpos) {
curpos--;
backspace();
if (s[curpos] == 26)
backspace();
}
break;
case 21:
case 24:
while (curpos) {
curpos--;
backspace();
if (s[curpos] == 26)
backspace();
}
break;
case 27:
in_ansi=1;
break;
}
}
if (in_ansi==3)
in_ansi=0;
}
gtitle=0; /* Color Titles */
if (hangup)
s[0] = 0;
}
End of additional void
Strings to add:
972-Enter to use current title, [Ctrl-Z] to abort.
973-Enter to Abort.
Optional:
Add 'gtitle' to the list of int's declared in VARS.H, and 'make fcns'. Then
go up to 'void input1' in COM.C, and make the changes there that have been
commented in 'void titlein' with /* Color Titles */. This will allow color
titles for messages that are NOT responding to another message.
Any questions? Just send me E-mail, and I'll get a reply right back to ya.
Disclaimer:
I didn't make you install this mod (though I'd like to <g>).